import create from 'zustand';

export interface GetStartedState {
    organizationName: string;
    earningReportChart: boolean;
    upComingDisbursement: boolean;
    recentDisbursement: boolean;



    setOrganizationName: (organizationName: string) => void;
    setEarningReportChart: (earningReportChart: boolean) => void;
    setUpcomingDisbursement: (upComingDisbursement: boolean) => void;
    setRecentDisbursement: (recentDisbursement: boolean) => void;
    clear: () => void;
}
export const useGetStartedStateStore = create<GetStartedState>((set) => ({
    organizationName: '',
    earningReportChart: undefined,
    upComingDisbursement: undefined,
    recentDisbursement: undefined,

    setOrganizationName(organizationName: string) {
        set(() => ({
            organizationName
        }));
    },

    setEarningReportChart(earningReportChart: boolean) {
        set(() => ({
            earningReportChart: earningReportChart
        }));
    },
    setUpcomingDisbursement(upComingDisbursement: boolean) {
        set(() => ({
            upComingDisbursement: upComingDisbursement
        }));
    },
    setRecentDisbursement(recentDisbursement: boolean) {
        set(() => ({
            recentDisbursement: recentDisbursement
        }));
    },
    clear() {
        set(() => ({
            earningReportChart: undefined,
            upComingDisbursement: undefined,
            recentDisbursement: undefined
        }));
    }
}));
